Integrand size = 20, antiderivative size = 320 \[ \int \frac {(c+d x)^2}{a+b \cosh (e+f x)} \, dx=\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}+\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {2 d^2 \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^3}+\frac {2 d^2 \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^3} \]
[Out]
Time = 0.53 (sec) , antiderivative size = 320, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3401, 2296, 2221, 2611, 2320, 6724} \[ \int \frac {(c+d x)^2}{a+b \cosh (e+f x)} \, dx=\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{f^2 \sqrt {a^2-b^2}}-\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{f^2 \sqrt {a^2-b^2}}+\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}+1\right )}{f \sqrt {a^2-b^2}}-\frac {(c+d x)^2 \log \left (\frac {b e^{e+f x}}{\sqrt {a^2-b^2}+a}+1\right )}{f \sqrt {a^2-b^2}}-\frac {2 d^2 \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{f^3 \sqrt {a^2-b^2}}+\frac {2 d^2 \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{f^3 \sqrt {a^2-b^2}} \]
[In]
[Out]
Rule 2221
Rule 2296
Rule 2320
Rule 2611
Rule 3401
Rule 6724
Rubi steps \begin{align*} \text {integral}& = 2 \int \frac {e^{e+f x} (c+d x)^2}{b+2 a e^{e+f x}+b e^{2 (e+f x)}} \, dx \\ & = \frac {(2 b) \int \frac {e^{e+f x} (c+d x)^2}{2 a-2 \sqrt {a^2-b^2}+2 b e^{e+f x}} \, dx}{\sqrt {a^2-b^2}}-\frac {(2 b) \int \frac {e^{e+f x} (c+d x)^2}{2 a+2 \sqrt {a^2-b^2}+2 b e^{e+f x}} \, dx}{\sqrt {a^2-b^2}} \\ & = \frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(2 d) \int (c+d x) \log \left (1+\frac {2 b e^{e+f x}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2} f}+\frac {(2 d) \int (c+d x) \log \left (1+\frac {2 b e^{e+f x}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2} f} \\ & = \frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}+\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {\left (2 d^2\right ) \int \operatorname {PolyLog}\left (2,-\frac {2 b e^{e+f x}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2} f^2}+\frac {\left (2 d^2\right ) \int \operatorname {PolyLog}\left (2,-\frac {2 b e^{e+f x}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2} f^2} \\ & = \frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}+\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {\left (2 d^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,\frac {b x}{-a+\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{e+f x}\right )}{\sqrt {a^2-b^2} f^3}+\frac {\left (2 d^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}\left (2,-\frac {b x}{a+\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{e+f x}\right )}{\sqrt {a^2-b^2} f^3} \\ & = \frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}+\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {2 d (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {2 d^2 \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^3}+\frac {2 d^2 \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^3} \\ \end{align*}
Time = 0.19 (sec) , antiderivative size = 247, normalized size of antiderivative = 0.77 \[ \int \frac {(c+d x)^2}{a+b \cosh (e+f x)} \, dx=\frac {(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )-(c+d x)^2 \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )+\frac {2 d \left (f (c+d x) \operatorname {PolyLog}\left (2,\frac {b e^{e+f x}}{-a+\sqrt {a^2-b^2}}\right )-d \operatorname {PolyLog}\left (3,\frac {b e^{e+f x}}{-a+\sqrt {a^2-b^2}}\right )\right )}{f^2}-\frac {2 d \left (f (c+d x) \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )-d \operatorname {PolyLog}\left (3,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )\right )}{f^2}}{\sqrt {a^2-b^2} f} \]
[In]
[Out]
\[\int \frac {\left (d x +c \right )^{2}}{a +b \cosh \left (f x +e \right )}d x\]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 736 vs. \(2 (288) = 576\).
Time = 0.26 (sec) , antiderivative size = 736, normalized size of antiderivative = 2.30 \[ \int \frac {(c+d x)^2}{a+b \cosh (e+f x)} \, dx=-\frac {2 \, b d^{2} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} {\rm polylog}\left (3, -\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) + {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}}}{b}\right ) - 2 \, b d^{2} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} {\rm polylog}\left (3, -\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) - {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}}}{b}\right ) - 2 \, {\left (b d^{2} f x + b c d f\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} {\rm Li}_2\left (-\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) + {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b} + 1\right ) + 2 \, {\left (b d^{2} f x + b c d f\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} {\rm Li}_2\left (-\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) - {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b} + 1\right ) + {\left (b d^{2} e^{2} - 2 \, b c d e f + b c^{2} f^{2}\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (f x + e\right ) + 2 \, b \sinh \left (f x + e\right ) + 2 \, b \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + 2 \, a\right ) - {\left (b d^{2} e^{2} - 2 \, b c d e f + b c^{2} f^{2}\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (f x + e\right ) + 2 \, b \sinh \left (f x + e\right ) - 2 \, b \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + 2 \, a\right ) - {\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x - b d^{2} e^{2} + 2 \, b c d e f\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) + {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b}\right ) + {\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x - b d^{2} e^{2} + 2 \, b c d e f\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) - {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b}\right )}{{\left (a^{2} - b^{2}\right )} f^{3}} \]
[In]
[Out]
\[ \int \frac {(c+d x)^2}{a+b \cosh (e+f x)} \, dx=\int \frac {\left (c + d x\right )^{2}}{a + b \cosh {\left (e + f x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {(c+d x)^2}{a+b \cosh (e+f x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
\[ \int \frac {(c+d x)^2}{a+b \cosh (e+f x)} \, dx=\int { \frac {{\left (d x + c\right )}^{2}}{b \cosh \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {(c+d x)^2}{a+b \cosh (e+f x)} \, dx=\int \frac {{\left (c+d\,x\right )}^2}{a+b\,\mathrm {cosh}\left (e+f\,x\right )} \,d x \]
[In]
[Out]